#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src

# Test Scheme support: scheme-format string with a loop.

cat <<\EOF > xg-sc-format-1.scm
(_ "~{~*~}")
EOF

: ${XGETTEXT=xgettext}
${XGETTEXT} -k_ --omit-header --no-location -d xg-sc-format-1.tmp xg-sc-format-1.scm || Exit 1
LC_ALL=C tr -d '\r' < xg-sc-format-1.tmp.po > xg-sc-format-1.po || Exit 1

cat <<\EOF > xg-sc-format-1.ok
#, scheme-format
msgid "~{~*~}"
msgstr ""
EOF

: ${DIFF=diff}
${DIFF} xg-sc-format-1.ok xg-sc-format-1.po
result=$?

exit $result
